  package com.wxy.config;

import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.TimeUnit;

import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.web.servlet.HandlerInterceptor;

import com.wxy.domain.user;

import jakarta.servlet.http.Cookie;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;

public class MyhandleInterceptor implements HandlerInterceptor{
	private StringRedisTemplate stringRedisTemplate;
	public MyhandleInterceptor(StringRedisTemplate stringRedisTemplate) {
		this.stringRedisTemplate=stringRedisTemplate;
	}
	@Override
	public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws IOException{
		// TODO 自动生成的方法存根
		request.setCharacterEncoding("UTF-8");
		response.setContentType("text/html;charset=utf-8");
		return true;
	}
}
